#!/usr/bin/python

import sys
import os
import re

affil_re = re.compile(r'(.*_)\(([^)]*)\).(.*)')

def main(file):
    for line in open(file):
	mo = affil_re.search(line)
	if not mo == None:
	    print mo.group(1) + mo.group(2) + mo.group(3)
	else:
	    print line.strip()

if __name__=="__main__":
    main(sys.argv[1])
